/*     */ package com.umeng.common.net;
/*     */ 
/*     */ import android.content.Context;
/*     */ import android.content.Intent;
/*     */ import android.content.ServiceConnection;
/*     */ import android.os.Bundle;
/*     */ import android.os.Handler;
/*     */ import android.os.Message;
/*     */ import android.os.Messenger;
/*     */ import com.umeng.common.Log;
/*     */ 
/*     */ public class a
/*     */ {
/*  27 */   private static final String b = a.class.getName();
/*     */   private Context c;
/*     */   private l d;
/*     */   private Messenger e;
/*     */   private String f;
/*     */   private String g;
/*     */   private String h;
/*     */   private String i;
/*     */   private String j;
/*     */   private String[] k;
/*  44 */   private boolean l = false;
/*     */ 
/*  71 */   final Messenger a = new Messenger(new b());
/*     */ 
/* 134 */   private ServiceConnection m = new b(this);
/*     */ 
/*     */   public void a(String paramString)
/*     */   {
/*  47 */     this.i = paramString;
/*     */   }
/*     */ 
/*     */   public void b(String paramString) {
/*  51 */     this.j = paramString;
/*     */   }
/*     */ 
/*     */   public void a(String[] paramArrayOfString)
/*     */   {
/*  59 */     this.k = paramArrayOfString;
/*     */   }
/*     */ 
/*     */   public void a(boolean paramBoolean)
/*     */   {
/*  68 */     this.l = paramBoolean;
/*     */   }
/*     */ 
/*     */   public a(Context paramContext, String paramString1, String paramString2, String paramString3, l paraml)
/*     */   {
/* 182 */     this.c = paramContext.getApplicationContext();
/*     */ 
/* 184 */     this.f = paramString1;
/* 185 */     this.g = paramString2;
/* 186 */     this.h = paramString3;
/* 187 */     this.d = paraml;
/*     */   }
/*     */ 
/*     */   public void a() {
/* 191 */     Intent localIntent = new Intent(this.c, DownloadingService.class);
/* 192 */     this.c.bindService(localIntent, this.m, 1);
/*     */   }
/*     */ 
/*     */   static class a
/*     */   {
/*     */     public String a;
/*     */     public String b;
/*     */     public String c;
/*     */     public String d;
/*     */     public String e;
/* 206 */     public String[] f = null;
/*     */ 
/* 211 */     public boolean g = false;
/*     */ 
/*     */     public a(String paramString1, String paramString2, String paramString3) {
/* 214 */       this.a = paramString1;
/* 215 */       this.b = paramString2;
/* 216 */       this.c = paramString3;
/*     */     }
/*     */ 
/*     */     public Bundle a() {
/* 220 */       Bundle localBundle = new Bundle();
/* 221 */       localBundle.putString("mComponentName", this.a);
/* 222 */       localBundle.putString("mTitle", this.b);
/* 223 */       localBundle.putString("mUrl", this.c);
/* 224 */       localBundle.putString("mMd5", this.d);
/* 225 */       localBundle.putString("mTargetMd5", this.e);
/* 226 */       localBundle.putStringArray("reporturls", this.f);
/* 227 */       localBundle.putBoolean("rich_notification", this.g);
/* 228 */       return localBundle;
/*     */     }
/*     */ 
/*     */     public static a a(Bundle paramBundle) {
/* 232 */       String str1 = paramBundle.getString("mComponentName");
/* 233 */       String str2 = paramBundle.getString("mTitle");
/* 234 */       String str3 = paramBundle.getString("mUrl");
/* 235 */       a locala = new a(str1, str2, str3);
/* 236 */       locala.d = paramBundle.getString("mMd5");
/* 237 */       locala.e = paramBundle.getString("mTargetMd5");
/* 238 */       locala.f = paramBundle.getStringArray("reporturls");
/* 239 */       locala.g = paramBundle.getBoolean("rich_notification");
/* 240 */       return locala;
/*     */     }
/*     */   }
/*     */ 
/*     */   class b extends Handler
/*     */   {
/*     */     b()
/*     */     {
/*     */     }
/*     */ 
/*     */     public void handleMessage(Message paramMessage)
/*     */     {
/*     */       try
/*     */       {
/*  83 */         Log.c(a.b(), "DownloadAgent.handleMessage(" + paramMessage.what + 
/*  84 */           "): ");
/*  85 */         switch (paramMessage.what) {
/*     */         case 1:
/*  87 */           if (a.i(a.this) != null) {
/*  88 */             a.i(a.this).a();
/*     */           }
/*  90 */           break;
/*     */         case 3:
/*  92 */           if (a.i(a.this) != null) {
/*  93 */             a.i(a.this).a(paramMessage.arg1);
/*     */           }
/*  95 */           break;
/*     */         case 5:
/*  97 */           a.j(a.this).unbindService(a.k(a.this));
/*  98 */           if (a.i(a.this) != null) {
/*  99 */             if ((paramMessage.arg1 == 1) || 
/* 100 */               (paramMessage.arg1 == 3)) {
/* 101 */               a.i(a.this)
/* 102 */                 .a(paramMessage.arg1, 
/* 103 */                 paramMessage.arg2, 
/* 104 */                 paramMessage
/* 105 */                 .getData()
/* 106 */                 .getString(
/* 107 */                 "filename"));
/*     */             } else {
/* 109 */               a.i(a.this).a(
/* 110 */                 0, 
/* 111 */                 0, 
/* 112 */                 null);
/* 113 */               Log.c(a.b(), "DownloadAgent.handleMessage(DownloadingService.DOWNLOAD_COMPLETE_FAIL): ");
/*     */             }
/*     */           }
/* 116 */           break;
/*     */         case 2:
/* 118 */           a.i(a.this).b(paramMessage.arg1);
/* 119 */           break;
/*     */         case 4:
/*     */         default:
/* 121 */           super.handleMessage(paramMessage);
/*     */         }
/*     */       } catch (Exception localException) {
/* 124 */         localException.printStackTrace();
/* 125 */         Log.c(a.b(), "DownloadAgent.handleMessage(" + paramMessage.what + 
/* 126 */           "): " + localException.getMessage());
/*     */       }
/*     */     }
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\umeng_sdk.jar
 * Qualified Name:     com.umeng.common.net.a
 * JD-Core Version:    0.6.2
 */